// 格式化图片路径，拼接

export const useFormatImgPath = (imgPath: string) => {
  if (imgPath?.includes('http')) return imgPath;
  const baseImgUrl = 'https://imagev2.xmcdn.com/';
  if (imgPath?.includes(baseImgUrl)) {
    return imgPath;
  } else {
    const fullPath = baseImgUrl + imgPath;
    return fullPath;
  }
};
